import Request from "@/utils/Request.js";
import {useUserStore} from "@/stores/useUSerStore.js";

export const getClass =(data)=>{
    return Request({
        url:'/group/get',
        method:"GET",
        params: data,
        headers:{
            Authorization:useUserStore().token
        }
    })
}
export const deleteClass =(a)=>{
    return Request({
        url:"/group/delete",
        method:"DELETE",
        params:{name:a}
    })
}
export const addClass =(a)=>{
    return Request({
        url:"/group/add",
        method:"POST",
        data:a
    })
}
export const getStudents =(a)=>{
    return Request({
        url:"/group/getStudents",
        method:"GET",
        params:{name:a}
    })
}
export const setClass =(a)=>{
    return Request({
        url:"/group/update",
        method:"POST",
        data:a
    })
}